//// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
//package com.linqingying.gitcode.pullrequest.comment.action
//
//import com.intellij.icons.AllIcons
//import com.intellij.ide.actions.RefreshAction
//import com.intellij.openapi.actionSystem.AnActionEvent
//import com.linqingying.gitcode.i18n.GitCodeBundle
//import com.linqingying.gitcode.pullrequest.ui.diff.GCPRDiffViewModel
//
//class GCPRDiffReviewThreadsReloadAction
//  : RefreshAction({ GitCodeBundle.message("pull.request.review.refresh.data.task") },
//                  { GitCodeBundle.message("pull.request.review.refresh.data.task.description") },
//                  AllIcons.Actions.Refresh) {
//
//  override fun update(e: AnActionEvent) {
//    val vm = e.getData(GCPRDiffViewModel.DATA_KEY)
//    e.presentation.isVisible = vm != null
//    e.presentation.isEnabled = vm?.isLoadingReviewData?.value?.not() ?: false
//  }
//
//  override fun actionPerformed(e: AnActionEvent) {
//    val model = e.getData(GCPRDiffViewModel.DATA_KEY) ?: return
//    model.reloadReview()
//  }
//}
